import {lazy} from 'react'
import Home from '../pages/Home'
import Login from '../pages/Login'
import Index from '../pages/index/Index'
// import OrderManager from '../pages/order/OrderManager'
// import AfsOrderManager from '../pages/order/AfsOrderManager'
// import JxSkuNameManager from '../pages/sku/JxSkuNameManager'
// import StoreSkuManager from '../pages/sku/StoreSkuManager'
import NotFound from '../pages/NotFound'

const OrderManager = lazy(() => import('../pages/order/OrderManager'))
const AfsOrderManager = lazy(() => import('../pages/order/AfsOrderManager'))
const JxSkuNameManager = lazy(() => import('../pages/sku/JxSkuNameManager'))
const StoreSkuManager = lazy(() => import('../pages/sku/StoreSkuManager'))
const BatUpdateStoreSku = lazy(() => import('../pages/sku/BatUpdateStoreSku'))
const StoreManager = lazy(() => import('../pages/store/StoreManager'))

export const rootPath = '/main'

const routers = [
  
]


export const homeRouters = [
  {
    path: rootPath, exact: true, title: '首页', component: Index
  },
  {
    path: rootPath + '/order', title: '订单管理', component: null, children: [
      {
        path: rootPath + '/ordermanager', title: '订单管理', component: OrderManager, parentPath: rootPath + '/order'
      },
      {
        path: rootPath + '/afsordermanager', title: '售后单管理', component: AfsOrderManager, parentPath: rootPath + '/order'
      }
    ]
  },
  {
    path: rootPath + '/sku', title: '商品管理', component: null, children: [
      {
        path: rootPath + '/jxskunamemanager', title: '京西商品管理', component: JxSkuNameManager, parentPath: rootPath + '/sku'
      },
      {
        path: rootPath + '/storeskumanager', title: '门店商品管理', component: StoreSkuManager, parentPath: rootPath + '/sku'
      },
      {
        path: rootPath + '/batupdatestoresku', title: '批量修改门店商品', component: BatUpdateStoreSku, parentPath: rootPath + '/sku'
      }
    ]
  },
  {
    path: rootPath + '/store', title: '门店管理', component: null, children: [
      {
        path: rootPath + '/storemanager', title: '门店管理', component: StoreManager, parentPath: rootPath + '/store'
      }
    ]
  },
  {
    path: '', title: '404', exact: true, component: NotFound
  }
]

export const noRootRouters = [
  {
    path: rootPath, title: '首页', component: Home
  },
  {
    path: '/login', title: '登录', exact: true, component: Login
  },
  {
    path: '', title: '404', exact: true, component: NotFound
  }
]

export default routers
